package org.dromara.business.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.dromara.business.domain.User;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;



/**
 * 用户信息视图对象 sys_user
 *
 * @author zlj
 * @date 2024-11-19
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = User.class)
public class UserVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 用户ID
     */
    @ExcelProperty(value = "用户ID")
    private Long userId;

    /**
     * 部门ID
     */
    @ExcelProperty(value = "部门ID")
    private Long deptId;

    /**
     * 用户账号
     */
    @ExcelProperty(value = "用户账号")
    private String userName;

    /**
     * 用户昵称
     */
    @ExcelProperty(value = "用户昵称")
    private String nickName;

    /**
     * 用户类型（sys_user系统用户）
     */
    @ExcelProperty(value = "用户类型", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "s=ys_user系统用户")
    private String userType;

    /**
     * 用户邮箱
     */
    @ExcelProperty(value = "用户邮箱")
    private String email;

    /**
     * 手机号码
     */
    @ExcelProperty(value = "手机号码")
    private String phonenumber;

    /**
     * openid
     */
    @ExcelProperty(value = "openid")
    private String openid;

    /**
     * unionid
     */
    @ExcelProperty(value = "unionid")
    private String unionid;

    /**
     * 用户性别（0男 1女 2未知）
     */
    @ExcelProperty(value = "用户性别", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "0=男,1=女,2=未知")
    private String sex;

    /**
     * 头像地址
     */
    @ExcelProperty(value = "头像地址")
    private Long avatar;

    /**
     * 密码
     */
    @ExcelProperty(value = "密码")
    private String password;

    /**
     * 积分
     */
    @ExcelProperty(value = "积分")
    private BigDecimal amount;

    /**
     * 总花费金额 用于用户vip等级评定
     */
    @ExcelProperty(value = "总花费金额 用于用户vip等级评定")
    private Integer allAmount;

    /**
     * 帐号状态（0正常 1停用）
     */
    @ExcelProperty(value = "帐号状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "0=正常,1=停用")
    private String status;

    /**
     * 最后登录IP
     */
    @ExcelProperty(value = "最后登录IP")
    private String loginIp;

    /**
     * 最后登录时间
     */
    @ExcelProperty(value = "最后登录时间")
    private Date loginDate;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;

    /**
     * 二维码
     */
    @ExcelProperty(value = "二维码")
    private Long qrCode;


    /**
     * 微信头像地址
     */
    @ExcelProperty(value = "微信头像地址")
    private String wxAvatar;

    /**
     * 上级
     */
    @ExcelProperty(value = "上级")
    private Long superiorId;
    @Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "superiorId")
    private String superiorName;

    private Long idCardId;
    @Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "idCardId")
    private String idCardUrl;

    private Long idCardNegativeId;
    @Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "idCardNegativeId")
    private String idCardNegativeUrl;

    // 手持身份证正面
    private Long idCardIdSczm;
    @Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "idCardIdSczm")
    private String idCardIdSczmUrl;
    @Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "qrCode")
    private String qrCodeUrl;
    private String pdf;
    @Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "pdf")
    private String pdfUrl;
    // 0未审核 1待审核 2审核通过 3审核未通过
    private String ifCardReview;

    //审核理由
    private String reasonsReview;
    // 身份证号码
    private String sfzHm;
    // 身份证姓名
    private String sfzXM;
    private Date gqTime;
    private Integer hyNumber;
    private boolean ifhy;

}
